package cn.tedu.spring.config;

import cn.tedu.spring.bean.UserDao;
import cn.tedu.spring.file.database;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class TestAppConfig {
    public static void main(String[] args) {
        ApplicationContext context = new AnnotationConfigApplicationContext
                (AppConfig.class);
        //获取database
        database database = context.getBean(database.class);
        System.out.println(database);
        UserDao userDao = context.getBean(UserDao.class);
        System.out.println(userDao);
    }
}
